package com.ku.log.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ku.log.entity.SysLog;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @author: GZQ
 * @create: 2020/08/09
 * @description:
 **/
@Data
public class LogQueryVo extends SysLog {

    /**查询时起止操作时间*/
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date operateTimeStart;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date operateTimeEnd;

    /**实体属性,方便传参查询*/
    private String operatorId;
    private String operatorName;
    private String loginName;

    /**分页参数*/
    private int pagingSize = 10;
    private int pagingNum = 1;

    public int getLimitStart() {
        return (pagingNum - 1) * pagingSize;
    }
    public int getLimitEnd() {
        return pagingNum * pagingSize;
    }

}
